<!--
 * @Description: 浮动布局
 * @Author: rendc
 * @Date: 2024-11-05 15:01:54
 * @LastEditors: rendc
 * @LastEditTime: 2024-11-05 15:15:23
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动布局</title>
  <style>
    div{
      font-size: 20px;
      /* 当前div中 1em = 20px */
      /* 当前div中 2em = 40px */
      /* 当前div中 1rem = 16px */
      width: 200px;
      height: 200px;
      border: 1px solid red;
      /* display: inline-block; */
    }
    #div1,#div2{
      float: left;
    }
    #div3{
      float: right;
    }
  </style>
</head>
<body>
  <div id="div1">div1</div>
  <div id="div2">div2</div>
  <div id="div3"><a href="">已注册，点击此处登录</a></div>
</body>
</html>